package org.zcl.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhuchenglin
 * @since 2022/8/22 13:53
 */
public enum PayToolEnum {
    ACCOUNT("10", "账户支付", "accountPayImpl"),
    THIRD("20", "三方支付", "thirdPayImpl");

    private String code;

    private String msg;

    private String value;

    PayToolEnum(String code, String msg, String value) {
        this.code = code;
        this.msg = msg;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public static final Map<String, PayToolEnum> map = new HashMap<>();

    static {
        PayToolEnum[] PayToolEnums = PayToolEnum.values();
        for (PayToolEnum e : PayToolEnums) {
            map.put(e.code, e);
        }
    }

    public static PayToolEnum getPayTool(String code) {
        return map.get(code);
    }

    public String getValue() {
        return value;
    }
}
